const base = require("./base");
const app = getApp();

const incident = {
  getOpenIncidents(page, callback) {
    base.get('incidents/' + app.globalData.currentOrg, callback, {
      status: 'Open',
      pageNumber: page
    })
  },
  getClosedIncidents(page, callback) {
    base.get('incidents/' + app.globalData.currentOrg, callback, {
      status: 'Closed',
      pageNumber: page
    })
  },
};

module.exports = incident;